package com.cloud.force.api.handler.common;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.jdbc.core.JdbcTemplate;

import com.cloud.force.api.handler.AfterHandler;
import com.cloud.force.api.handler.Request;
import com.cloud.force.api.handler.Response;

public class TestJdbcTemplateHandler extends AfterHandler{
	
	private static final Logger logger = LoggerFactory.getLogger(TestJdbcTemplateHandler.class);
	
	@Override
	public void afterHandler(Request request, Response resp, ApplicationContext context) {
		JdbcTemplate jdbcTemplate = context.getBean(JdbcTemplate.class);
		Integer i = jdbcTemplate.queryForObject("select count(*) from tab_part", Integer.class);
		logger.debug("TestJdbcTemplateHandler executed finished... result is:"+i);
	}


}
